package xxl.robotlegs.utils 
{
	/**
	 * ...
	 * @author XXL
	 */
	public class CallBackUtil 
	{
		
		[Inline]
		public static function SafelyCallBack(callback:Function, error:Object, message:Object):void
		{
			const len:int = callback.length;
			if (len == 0)
			{
				callback();
			}
			else if (len == 1)
			{
				callback(error);
			}
			else
			{
				callback(error, message);
			}
		}
		
	}

}